<div class="bjui-pageContent">
  <div class="pageFormContent" style="margin:1px;" data-layout-h="0">
    <ul class="nav nav-tabs" role="tablist">
      <li class="active">
        <a href="#cust" role="tab" data-toggle="tab">会员管理</a>
      </li>
      <li>
        <a href='#custcon' role='tab' data-toggle='tab'>联系人</a>
      </li>
      <li>
        <a href='#custgd' role='tab' data-toggle='tab'>跟单记录</a>
      </li>
      <li>
        <a href='#hetong' role='tab' data-toggle='tab'>订单管理</a>
      </li>
    </ul>
    <div class="tab-content">
      <div class="tab-pane fade active in" id="cust">
        <table class="table table-bordered table-striped table-hover">
          <tbody>
            <tr>
              <td>
                <label for='id_input' class='control-label x85'>ID:</label>
                {$Rs.id}
              </td>
              <td>
                <label for='title_input' class='control-label x85'>会员名称:</label>
                {$Rs.title}
              </td>
            </tr>
            <tr>
              <td>
                <label for='dizhi_input' class='control-label x85'>地址:</label>
                {$Rs.dizhi}
              </td>
              <td>
                <label for='fenlei_input' class='control-label x85'>进展:</label>
                {$Rs.fenlei}
              </td>
            </tr>
            <tr>
              <td>
                <label for='xcrq_input' class='control-label x85'>下次联系:</label>
                {$Rs.xcrq}
              </td>
              <td>
                <label for='xingming_input' class='control-label x85'>联系人:</label>
                {$Rs.xming}
              </td>
            </tr>
            <tr>
              <td>
                <label for='sex_input' class='control-label x85'>性别:</label>
                {$Rs.sex}
              </td>
<!--               <td>
                <label for='bumen_input' class='control-label x85'>部门职务:</label>
                {$Rs.bumen}
              </td> -->
              <td>
                <label for='qq_input' class='control-label x85'>QQ:</label>
                {$Rs.qq}
              </td>
            </tr>
            <tr>
              <td>
                <label for='phone_input' class='control-label x85'>手机号码:</label>
                {$Rs.phone}
              </td>
              <td>
                <label for='email_input' class='control-label x85'>EMAIL:</label>
                {$Rs.email}
              </td>
            </tr>
          <!--   <tr>
              <td>
                <label for='qq_input' class='control-label x85'>QQ:</label>
                {$Rs.qq}
              </td>
              <td>
                <label for='name_input' class='control-label x85'>爱好:</label>
                {$Rs.name}
              </td>
            </tr> -->
      <!--       <tr>
              <td>
                <label for='type_input' class='control-label x85'>客户来源:</label>
                {$Rs.type}
              </td>
              <td>
                <label for='juname_input' class='control-label x85'>分享给:</label>
                {$Rs.juname}
              </td>
            </tr>
            <tr>
              <td>
                <label for='uname_input' class='control-label x85'>添加人:</label>
                {$Rs.uname}
              </td>
              <td>
                <label for='addtime_input' class='control-label x85'>添加时间:</label>
                {$Rs.addtime}
              </td>
            </tr>
            <tr>
              <td>
                <label for='uuname_input' class='control-label x85'>更新人:</label>
                {$Rs.uuname}
              </td>
              <td>
                <label for='updatetime_input' class='control-label x85'>更新时间:</label>
                {$Rs.updatetime}
              </td>
            </tr>
            <tr></tr> -->
            <tr>
              <td colspan=2>
                <label for='beizhu_input' class='control-label x85'>客户描述:</label>
                <textarea name='beizhu'  cols='65' rows='5' >{$Rs.beizhu}</textarea>
              </td>
            </tr>
          </tbody>
        </table>
      </div>

      <div class='tab-pane fade' id='custcon'>
        <table class='table table-bordered table-striped table-hover'>
          <php>
            $custconlist=M('custcon')->where(array('jcid'=>I('id')))->select();
          </php>
          <thead>
            <tr>
              <th>ID</th>
              <th height=30>会员名称</th>
              <th>姓名</th>
              <th>性别</th>
              <th height=30>生日</th>
              <th height=30>手机号码</th>
              <th height=30>EMAIL</th>
              <th height=30>QQ</th>
              <th>添加时间</th>
              <th>更新时间</th>
              <th>详细</th>
            </tr>
          </thead>
          <tbody>
            <foreach name='custconlist' item='custconv'>
              <tr>
                <td>{$custconv.id}</td>
                <td>{$custconv.jcname|msubstr=###,0,20}</td>
                <td>{$custconv.xming}</td>
                <td>{$custconv.sex}</td>
                <td>{$custconv.birthday|msubstr=###,0,20}</td>
                <td>{$custconv.phone|msubstr=###,0,20}</td>
                <td>{$custconv.email|msubstr=###,0,20}</td>
                <td>{$custconv.qq|msubstr=###,0,20}</td>
                <td>{$custconv.addtime|substr=###,0,10}</td>
                <td>{$custconv.updatetime|substr=###,0,10}</td>
                <td>
                  <a href='__MODULE__/custcon/view/id/{$custconv['id']}/navTabId/{:CONTROLLER_NAME}'  data-toggle='dialog' data-width='800' data-height='500' data-id='dialog-maskcustcon' data-mask='true' >详细</a>
                </td>
              </tr>
            </foreach>
          </tbody>
        </table>
      </div>
      <div class='tab-pane fade' id='custgd'>
        <table class='table table-bordered table-striped table-hover'>
          <php>
            $custgdlist=M('custgd')->where(array('jcid'=>I('id')))->select();
          </php>
          <thead>
            <tr>
              <th>ID</th>
              <th height=30>详情</th>
              <th height=30>客户名称</th>
              <th>跟单方式</th>
              <th>进展阶段</th>
              <th>下次联系</th>
              <th height=30>跟单人</th>
              <th>跟单时间</th>
              <th>更新时间</th>
              <th>详细</th>
            </tr>
          </thead>
          <tbody>
            <foreach name='custgdlist' item='custgdv'>
              <tr>
                <td>{$custgdv.id}</td>
                <td>{$custgdv.value|msubstr=###,0,20}</td>
                <td>{$custgdv.jcname|msubstr=###,0,20}</td>
                <td>{$custgdv.type}</td>
                <td>{$custgdv.fenlei}</td>
                <td>{$custgdv.xcrq|substr=###,0,10}</td>
                <td>{$custgdv.uname|msubstr=###,0,20}</td>
                <td>{$custgdv.addtime|substr=###,0,10}</td>
                <td>{$custgdv.updatetime|substr=###,0,10}</td>
                <td>
                  <a href='__MODULE__/custgd/view/id/{$custgdv['id']}/navTabId/{:CONTROLLER_NAME}'  data-toggle='dialog' data-width='800' data-height='500' data-id='dialog-maskcustgd' data-mask='true' >详细</a>
                </td>
              </tr>
            </foreach>
          </tbody>
        </table>
      </div>
      <div class='tab-pane fade' id='hetong'>
        <table class='table table-bordered table-striped table-hover'>
          <php>
            $hetonglist=M('proout')->where(array('hyid'=>I('id')))->select();
          </php>
          <thead>
            <tr>
              <th>ID</th>
              <th>签约日期</th>
              <th height=30>客户名称</th>
              <th height=30>联系人</th>
              <th height=30>联系电话</th>
              <th>订单金额</th>
              <th>详细</th>
            </tr>
          </thead>
          <tbody>
            <foreach name='hetonglist' item='hetongv'>
              <tr>
                <td>{$hetongv.id}</td>
                <td>{$hetongv.addtime|substr=###,0,10}</td>
                <td>{$hetongv.hytitle|msubstr=###,0,20}</td>
                <td>{$hetongv.hyxming|msubstr=###,0,20}</td>
                <td>{$hetongv.hyphone|msubstr=###,0,20}</td>
                <td>{$hetongv['shuliang']*$hetongv['jpjiage']}</td>
                <td>
                  <a href='__MODULE__/proout/view/id/{$hetongv['id']}/navTabId/{:CONTROLLER_NAME}'  data-toggle='dialog' data-width='800' data-height='500' data-id='dialog-maskhetong' data-mask='true' >详细</a>
                </td>
              </tr>
            </foreach>
          </tbody>
        </table>
      </div>

    </div>
  </div>
  <div class="bjui-footBar">
    <ul>
      <li>
        <button type="button" class="btn-close" data-icon="close">关闭</button>
      </li>
    </ul>
  </div>
</div>